Automatic generation of ising hamiltonians for solving optimization problems in quantum computing

ABSTRACT

Configuring a quantum computing system to determine a solution to an optimization problem includes encoding the optimization problem in an encoding language to produce an encoded optimization model. The encoded optimization model is transformed into a unconstrained model. The encoded optimization model includes an objective function having one or more terms. The one or more terms are converted to one or more Pauli terms. An Ising Hamiltonian is generated using the one or more terms. The Ising Hamiltonian corresponds to the optimization problem. An instruction indicative of the Ising Hamiltonian is provided to the quantum computing system.

TECHNICAL FIELD

The present invention relates generally to a method, system, andcomputer program product for configuring optimization problems to run inquantum computing data processing environments. More particularly, thepresent invention relates to a method, system, and computer programproduct for automatic generation of Ising Hamiltonians for solvingoptimization problems in quantum computing.

BACKGROUND

Hereinafter, a “Q” prefix in a word of phrase is indicative of areference of that word or phrase in a quantum computing context unlessexpressly distinguished where used.

Molecules and subatomic particles follow the laws of quantum mechanics,a branch of physics that explores how the physical world works at themost fundamental levels. At this level, particles behave in strangeways, taking on more than one state at the same time, and interactingwith other particles that are very far away. Quantum computing harnessesthese quantum phenomena to process information.

The computers we use today are known as classical computers (alsoreferred to herein as “conventional” computers or conventional nodes, or“CN”). A conventional computer uses a conventional processor fabricatedusing semiconductor materials and technology, a semiconductor memory,and a magnetic or solid-state storage device, in what is known as a VonNeumann architecture. Particularly, the processors in conventionalcomputers are binary processors, i.e., operating on binary datarepresented in 1 and 0.

A quantum processor (q-processor) uses the odd nature of entangled qubitdevices (compactly referred to herein as “qubit,” plural “qubits”) toperform computational tasks. In the particular realms where quantummechanics operates, particles of matter can exist in multiplestates—such as an “on” state, an “off” state, and both “on” and “off”states simultaneously. Where binary computing using semiconductorprocessors is limited to using just the on and off states (equivalent to1 and 0 in binary code), a quantum processor harnesses these quantumstates of matter to output signals that are usable in data computing.

Conventional computers encode information in bits. Each bit can take thevalue of 1 or 0. These 1s and 0s act as on/off switches that ultimatelydrive computer functions. Quantum computers, on the other hand, arebased on qubits, which operate according to two key principles ofquantum physics: superposition and entanglement. Superposition meansthat each qubit can represent both a 1 and a 0 at the same time.Entanglement means that qubits in a superposition can be correlated witheach other in a non-classical way; that is, the state of one (whether itis a 1 or a 0 or both) can depend on the state of another, and thatthere is more information that can be ascertained about the two qubitswhen they are entangled than when they are treated individually.

Using these two principles, qubits operate as more sophisticatedprocessors of information, enabling quantum computers to function inways that allow them to solve difficult problems that are intractableusing conventional computers. IBM has successfully constructed anddemonstrated the operability of a quantum processor usingsuperconducting qubits (IBM is a registered trademark of InternationalBusiness Machines corporation in the United States and in othercountries.)

A superconducting qubit includes a Josephson junction. A Josephsonjunction is formed by separating two thin-film superconducting metallayers by a non-superconducting material. When the metal in thesuperconducting layers is caused to become superconducting—e.g. byreducing the temperature of the metal to a specified cryogenictemperature—pairs of electrons can tunnel from one superconducting layerthrough the non-superconducting layer to the other superconductinglayer. In a qubit, the Josephson junction—which functions as adispersive nonlinear inductor—is electrically coupled in parallel withone or more capacitive devices forming a nonlinear microwave oscillator.The oscillator has a resonance/transition frequency determined by thevalue of the inductance and the capacitance in the qubit. Any referenceto the term “qubit” is a reference to a superconducting qubit oscillatorcircuitry that employs a Josephson junction, unless expresslydistinguished where used.

The information processed by qubits is carried or transmitted in theform of microwave signals/photons in the range of microwave frequencies.The microwave frequency of a qubit output is determined by the resonancefrequency of the qubit. The microwave signals are captured, processed,and analyzed to decipher the quantum information encoded therein. Areadout circuit is a circuit coupled with the qubit to capture, read,and measure the quantum state of the qubit. An output of the readoutcircuit is information usable by a q-processor to perform computations.

A superconducting qubit has two quantum states—|0> and |1>. These twostates may be two energy states of atoms, for example, the ground (|g>)and first excited state (|e>) of a superconducting artificial atom(superconducting qubit). Other examples include spin-up and spin-down ofthe nuclear or electronic spins, two positions of a crystalline defect,and two states of a quantum dot. Since the system is of a quantumnature, any combination of the two states are allowed and valid.

For quantum computing using qubits to be reliable, quantum circuits,e.g., the qubits themselves, the readout circuitry associated with thequbits, and other parts of the quantum processor, must not alter theenergy states of the qubit, such as by injecting or dissipating energy,in any significant manner or influence the relative phase between the|0> and |1> states of the qubit. This operational constraint on anycircuit that operates with quantum information necessitates specialconsiderations in fabricating semiconductor and superconductingstructures that are used in such circuits.

SUMMARY

The illustrative embodiments provide a method, system, and computerprogram product. An embodiment includes a method for automaticgeneration of Ising Hamiltonians for solving optimization problems inquantum computing. An embodiment of a method for configuring a quantumcomputing system to determine a solution to an optimization problemincludes encoding the optimization problem in an encoding language toproduce an encoded optimization model. The embodiment further includestransforming the encoded optimization model into a unconstrained model,the encoded optimization model including an objective function havingone or more terms. The embodiment further includes converting the one ormore terms to one or more Pauli terms. The embodiment further includesgenerating an Ising Hamiltonian using the one or more terms, the IsingHamiltonian corresponding to the optimization problem. The embodimentfurther includes providing an instruction indicative of the IsingHamiltonian to the quantum computing system.

In another embodiment, the quantum computing system is configured tocompute a result associated with the optimization problem based upon theIsing Hamiltonian. Another embodiment further includes receiving theresult from the quantum computing system. In another embodiment, theresult is a solution of the optimization problem.

In another embodiment, transforming the encoded optimization model intoa unconstrained model comprises penalizing one or more equalityconstraints of the objective function by one or more penalty terms.

In another embodiment, the one or more terms include at least one of alinear term or a quadratic term. In another embodiment, the objectivefunction is a linear objective function or a quadradic objectivefunction. In another embodiment, the objective function further includesone or more binary decision variables associated with the optimizationproblem.

In another embodiment, the encoding of the optimization problem isperformed by a user.

An embodiment includes a computer usable program product. The computerusable program product includes a computer-readable storage device, andprogram instructions stored on the storage device.

An embodiment includes a computer system. The computer system includes aprocessor, a computer-readable memory, and a computer-readable storagedevice, and program instructions stored on the storage device forexecution by the processor via the memory.

BRIEF DESCRIPTION OF THE DRAWINGS

Certain novel features believed characteristic of the invention are setforth in the appended claims. The invention itself, however, as well asa preferred mode of use, further objectives and advantages thereof, willbest be understood by reference to the following detailed description ofthe illustrative embodiments when read in conjunction with theaccompanying drawings, wherein:

FIG. 1 depicts a block diagram of a network of data processing systemsin which illustrative embodiments may be implemented;

FIG. 2 depicts a block diagram of a data processing system in whichillustrative embodiments may be implemented;

FIG. 3 depicts example diagrams of a 1-dimensional and a 2-dimensionalIsing model;

FIG. 4 depicts a block diagram of an example configuration for automaticgeneration of Ising Hamiltonians for solving optimization problems inquantum computing in accordance with an illustrative embodiment; and

FIG. 5 depicts a flowchart of an example process for automaticgeneration of Ising Hamiltonians for solving optimization problems inquantum computing in accordance with an illustrative embodiment. FIG. 6depicts a code snippet. FIG. 7 depicts a code snippet. FIG. 8 depicts acode snippet and a graph.

DETAILED DESCRIPTION

Computing of optimization problems is a well-recognized technologicalfield of endeavor. Quantum computing using processors formed fromquantum qubits is another well recognized technological field ofendeavor. The present state of the technology in a combination of thesetwo fields of endeavor has certain drawbacks and limitations. Theoperations and/or configurations of the illustrative embodiments impartadditional or new capabilities to improve the existing technology inthese technological fields of endeavor, especially in configuringoptimization problems for execution in quantum computing environments.

A class of problems exists called optimization problems. An optimizationproblem is a computational problem in which the best or optimal solutionis to be determined for a different problem where the different problemhas several possible solutions. For example, the different problem canbe the famous traveling salesman problem where a route has to bedetermined between several cities such that a traveling salesman coverseach of the of cities without revising any of the cities. This problemhas many possible solutions—routes between the cities. An optimizationproblem related to the traveling salesman problem is to find theshortest—i.e., the best or most optimal route—from the many possibleroutes, each of which satisfies the requirements of the travelingsalesman problem.

Configuring an optimization problem for execution on a computer so thatthe computer can compute the optimal solution in finite time is adifficult problem in itself. Until recently, the only computingresources available for executing optimization problems were theconventional computers as described herein. Many optimization problemsare too difficult or too complex for conventional computers to computein finite time with reasonable resources. Generally, an approximatedsolution which can be computed in reasonable time and with reasonableresources is accepted as the near-optimal solution in such cases.

The advent of quantum computing has presented advancement possibilitiesin many areas of computing, including the computation of optimizationproblems. Because a quantum computing system can evaluate many solutionsfrom the solution space at once, the illustrative embodiments recognizethat such systems can be suitable for solving optimization problems.

The illustrative embodiments recognize that solving an optimizationproblem in quantum computing typically requires translating theoptimization problem, along with its inputs, into an Ising Hamiltonian,and then passing the Ising Hamiltonian to a quantum variationalalgorithm, such as the Variational Quantum Eigensolver (VQE) algorithmand the Quantum Approximate Optimization Algorithm (QAOA).

The illustrative embodiments recognize that a problem of the prior-artapproach for configuring optimization problems for execution usingquantum computers is to build the Ising model required to generate theIsing Hamiltonian. Each different optimization problem requires theconstruction of its own unique Ising model. Therefore, solvingoptimization problems in quantum computing using prior-art methodsrequires building a different Ising model for each of those problem.This is a difficult and time-consuming task, which requires specializedknowledge. In prior-art methods, users are required to write IsingHamiltonians for each type of optimization problem manually which isdifficult due to the complicated and unintuitive nature of IsingHamiltonians.

There are some modeling languages and tools for combinatorialoptimization such as Optimization Programming Language (OPL), GeneralAlgebraic Modeling System (GAMS), and A Mathematical ProgrammingLanguage (AMPL). Because they are designed to solve optimizationproblems classically, they do not have functionality to connect theirmodels to quantum computers. D-Wave has a quantum annealing machine andsome modeling tools, such as constraint satisfaction problem (CSP).However, none of such modeling languages or tools has the functionalityto convert a general optimization model into an Ising Hamiltonian.Qiskit Aqua contains translators of very specific optimization problemsinto Ising Hamiltonians, but these are ad-hoc solutions, implemented ona case-by-case basis, with an Ising model manually built for each of thesupported optimization problems. Qiskit Aqua does not contain anysolution for a general optimization problem, and an automatic IsingHamiltonian generator is not provided.

The illustrative embodiments dramatically simplify the task of designingand implementing quantum-computing-based solutions for optimizationproblems. The illustrative embodiments provide automatic generation ofIsing models and the corresponding Ising Hamiltonians for differentoptimization problems. An embodiment encodes using classical computingas opposed to quantum computing. The optimization problem is encoded ina given language. For example, a particular embodiment uses a librarycalled IBM™ Decision Optimization CPLEX Modeling for Python (DOcplex) toencode the optimization problem.

An embodiment takes that classically produced problem encoding andtranslates the encoding into an Ising Hamiltonian. The embodiment thenpasses the Ising Hamiltonian to a variational quantum algorithm for thecomputation of the solution on a quantum computer or simulator. Becauseof the solution provided by the illustrative embodiments for thisdifficult piece of optimization problem configuration in quantumcomputing, the number of optimization problems that can be solved usingquantum computing is now greatly increased.

An embodiment builds an optimization model in an intuitive way. Aparticular embodiment uses DOcplex to encode the Ising modelcorresponding to an optimization problem. Different languages and/orlibraries can be used to specify the Ising model corresponding to aparticular optimization problem. The embodiment automatically generatesthe Ising Hamiltonian corresponding to the Ising model built by theuser. The generated Ising Hamiltonian can then be passed as an input toa quantum algorithm, such as VQE and QAOA.

The quantum algorithm generates a quantum circuit. The quantum circuitis compiled and executed on a quantum computer or quantum simulator.DOcplex requires defining decision variables, constraints, and anobjective function. DOcplex supports (1) binary, integer, and continuousvariables, (2) linear and quadratic terms in constraints and objectivefunctions, and (3) equality and inequality constraints. For simplicity,assume that it is desired to support (1) only binary decision variables,(2) linear and quadratic terms in constraints and objective functions,and (3) only equality constraints. Then, the following optimizationformulation is the foundation for the generation of the IsingHamiltonian:

Original  formulation Minimize∑_(i ∈ I, j ∈ I)c_(i, j)x_(i)x_(j)+ ∑_(i ∈ I)d_(i)x_(i)Subject  to  ∑_(i ∈ I)a_(i, j)x_(i) = b_(j), j ∈ Jx_(i) ∈ {0, 1}, i ∈ I

Note that I and J are sets of decision variables and constraints,respectively, c_(i,j),d_(i),a_(i,j),b_(j) are parameters and x_(i) arebinary decision variables. If the input problem is a maximizationproblem, the solution proposed by this invention multiplies theobjective function by −1 to change it into a minimization problem.

An embodiment transforms the formulation into an unconstrained model bypenalizing the constraints as follows. Note that M_(j) is the penaltycoefficient (parameter) of the j-th constraint.

Unconstrained  model Minimize∑_(i ∈ I, j ∈ I)c_(i, j)x_(i)x_(j) + ∑_(i ∈ I)d_(i)x_(i) + ∑_(j ∈ J)M_(j)(b_(j) − ∑_(i)a_(i, j)x_(i))²Subject  to  x_(i) ∈ {0, 1}, i ∈ I

In an embodiment, a method is provided to adjust the penaltycoefficients M_(j) corresponding to the j-th constraint automatically ifall parameters a_(i,j) and b_(j) are integers for i∈I. Otherwise, incertain embodiments the penalty coefficients are disregarded asparameters and may be set manually by a user.

The objective function:

F(x)=Σ_(i∈I,j∈I)C_(i,j)x_(i)x_(j)+Σ_(∈I)d_(i)x_(i)+of an unconstrainedmodel can be separated as F(x)=f(x)+Σ_(j∈J)M_(j)P_(j) whereΣ_(i∈I,j∈I)C_(i,j)x_(i)x_(j)+Σ_(∈I)d_(i)x_(i)is the objective functionof the original formulation and

P_(j)(x)=(b_(j)−Σ_(i)a_(i,j)x_(i))² is the penalty term of the j-thconstraint. Because all variables x_(i,j) are binary,

f=Σ_(i∈I,j∈I)max(c_(i,j) , 0)+max(d_(i) , 0) is an upper bound of f(x).If all of a_(i) and b_(j) are integers, let M_(j)=f+ε where ε is aparameter (e.g., ε=1) to guarantee that the optimal solution of theunconstrained model is optimal to the original formulation.

If the j-th constraint is satisfied, P_(j)(x)=0 holds. Otherwise,P_(j)(x)>0 holds. Because all a_(i) and b_(j)are integer, P_(j)(x)0holds if the constraint is not satisfied. Then, it also holds thatM_(j)P_(j)(x)>f(x) where M_(j)=f+ε. Thus, if a solution x is feasible tothe original formulation, F(x)=f(x)≤f holds. Otherwise, F(x)>f holds.For example, because a_(i) and b_(j) of the TSP are integer, thefollowing holds:

M_(j)=Σ_(i∈v,j∈v)max(w_(i,j) ,0)+ε

An embodiment converts the linear and quadratic terms in the objectivefunction of the unconstrained model into Pauli terms as follows:

Pauli  terms  in  Ising  Hamiltonian$\left. {c_{i,j}x_{i}x_{j}}\rightarrow{c_{i,j}\frac{1 - Z_{i}}{2}\frac{1 - Z_{j}}{2}} \right.$$\left. {d_{i}x_{i}}\rightarrow{d_{i}\frac{1 - Z_{i}}{2}} \right.$

Finally, based on the Pauli terms above, an embodiment builds an IsingHamiltonian corresponding to the original optimization problem. Considerthe following example of how an embodiment allows for generating theIsing Hamiltonian for the Traveling Salesman Problem (TSP). Note that Vdenotes the set of nodes to be visited in the TSP, w_(i,j) is aparameter denoting distances between the nodes, and are binary decisionvariables.

TSP can be formulated as follows:

Formulation of TSP Minimize

Σ_(i∈v,j∈V,p∈V)w_(i,j),x_(i,p)x_(j,p)+1 Subject to

Σ_(p∈V)x_(i,p) =1,i∈V

Σi∈Vx_(i,p) =1,p∈V

x_(i,p)∈{0,1}, i∈V,p∈V.

An embodiment builds an optimization model of the formulation with anencoding language such as DOcplex. An example of an optimization modelwritten in DOcplex is as follows: see FIG. 6, ref. num. 602.

An embodiment transforms the encoded optimization model into an IsingHamiltonian. An example of generating an Ising Hamiltonian from theoptimization model is as follows: see FIG. 6, ref. num. 604.

The above instruction contains a call to an Application ProgrammingInterface (API) call that converts the linear and quadratic terms in theobjective function of the unconstrained model into Pauli terms, and thenbuilds the Ising Hamiltonian from those Pauli terms.

Finally, an embodiment calculates a solution to the optimization problemusing the generated Ising Hamiltonian with a quantum processor or aquantum processor simulation executed by a classical processor.

An example of applying a solver in Qiskit Aqua is as follows: see FIG.7, ref. num. 702; FIG. 8, ref. num. 802, 804, and the graph depictedtherein.

Optimization problems are computation-intensive tasks. A thoroughanalysis of a solution space of an optimization problem can easily takeseveral years on a commercially available conventional computer.Therefore, the illustrative embodiments also recognize that computingthe optimal solution in a time-efficient manner using quantum computersis even more difficult using the presently available methods.

The present state of the technological field of endeavor of solvingoptimization problems using quantum computers presently does not includea mechanism to produce Ising Hamiltonians corresponding to the problembeing solved. A need exists for generating the Ising Hamiltonian so thatthe quantum computer can actually perform the computation of solutionsfor optimization problems. A need exists that such generation beperformed on a per-problem basis without manual preparation of Isingmodels.

The illustrative embodiments recognize that the presently availabletools or solutions do not address these needs or provide adequatesolutions for these needs. The illustrative embodiments used to describethe invention generally address and solve the above-described problemsand other related problems by automatic generation of Ising Hamiltoniansfor solving optimization problems in quantum computing.

An embodiment can be implemented as a software application. Theapplication implementing an embodiment, or one or more componentsthereof, can be configured as a modification of an existingquantum-classical data processing system—i.e., a native application inthe classical computing system that produces inputs for a quantumcomputing system, as an application executing in a classical dataprocessing system communicating with an existing quantum computingsystem over a network, as a separate application that operates inconjunction with an existing quantum-classical system in other ways, astandalone application for execution on a classical system, or somecombination thereof.

The manner of automatic generation of Ising Hamiltonians for solvingoptimization problems in quantum computing described herein isunavailable in the presently available methods in the technologicalfield of endeavor pertaining to quantum computing, particularly toconfiguring optimization problems for execution on quantum computers. Amethod of an embodiment described herein, when implemented to execute ona device or data processing system, comprises substantial advancement ofthe functionality of that device or data processing system inautomatically generating Ising Hamiltonian instructions that are neededfor configuring optimization problems for execution on quantumcomputers.

The illustrative embodiments are described with respect to certain typesof algorithms, libraries, code, instructions, dimensions, data, devices,data processing systems, environments, components, and applications onlyas examples. Any specific manifestations of these and other similarartifacts are not intended to be limiting to the invention. Any suitablemanifestation of these and other similar artifacts can be selectedwithin the scope of the illustrative embodiments.

Furthermore, the illustrative embodiments may be implemented withrespect to any type of data, data source, or access to a data sourceover a data network. Any type of data storage device may provide thedata to an embodiment of the invention, either locally at a dataprocessing system or over a data network, within the scope of theinvention. Where an embodiment is described using a mobile device, anytype of data storage device suitable for use with the mobile device mayprovide the data to such embodiment, either locally at the mobile deviceor over a data network, within the scope of the illustrativeembodiments.

The illustrative embodiments are described using specific code, designs,architectures, protocols, layouts, schematics, and tools only asexamples and are not limiting to the illustrative embodiments.Furthermore, the illustrative embodiments are described in someinstances using particular software, tools, and data processingenvironments only as an example for the clarity of the description. Theillustrative embodiments may be used in conjunction with othercomparable or similarly purposed structures, systems, applications, orarchitectures. For example, other comparable mobile devices, structures,systems, applications, or architectures therefor, may be used inconjunction with such embodiment of the invention within the scope ofthe invention. An illustrative embodiment may be implemented inhardware, software, or a combination thereof.

The examples in this disclosure are used only for the clarity of thedescription and are not limiting to the illustrative embodiments.Additional data, operations, actions, tasks, activities, andmanipulations will be conceivable from this disclosure and the same arecontemplated within the scope of the illustrative embodiments.

Any advantages listed herein are only examples and are not intended tobe limiting to the illustrative embodiments. Additional or differentadvantages may be realized by specific illustrative embodiments.Furthermore, a particular illustrative embodiment may have some, all, ornone of the advantages listed above.

With reference to the figures and in particular with reference to FIGS.1 and 2, these figures are example diagrams of data processingenvironments in which illustrative embodiments may be implemented. FIGS.1 and 2 are only examples and are not intended to assert or imply anylimitation with regard to the environments in which differentembodiments may be implemented. A particular implementation may makemany modifications to the depicted environments based on the followingdescription.

FIG. 1 depicts a block diagram of a network of data processing systemsin which illustrative embodiments may be implemented. Data processingenvironment 100 is a network of classical computers in which theillustrative embodiments may be implemented. Data processing environment100 includes network 102. Network 102 is the medium used to providecommunications links between various devices and computers connectedtogether within data processing environment 100. Network 102 may includeconnections, such as wire, wireless communication links, or fiber opticcables.

Clients or servers are only example roles of certain data processingsystems connected to network 102 and are not intended to exclude otherconfigurations or roles for these data processing systems. Server 104and server 106 are classical data processing systems and couple tonetwork 102 along with storage unit 108. Software applications mayexecute on any computer in data processing environment 100. Clients 110,112, and 114 are also coupled to network 102. A data processing system,such as server 104 or 106, or client 110, 112, or 114 may contain dataand may have software applications or software tools executing thereon.

Only as an example, and without implying any limitation to sucharchitecture, FIG. 1 depicts certain components that are usable in anexample implementation of an embodiment. For example, servers 104 and106, and clients 110, 112, 114, are depicted as servers and clients onlyas examples and not to imply a limitation to a client-serverarchitecture. As another example, an embodiment can be distributedacross several data processing systems and a data network as shown,whereas another embodiment can be implemented on a single dataprocessing system within the scope of the illustrative embodiments. Dataprocessing systems 104, 106, 110, 112, and 114 also represent examplenodes in a cluster, partitions, and other configurations suitable forimplementing an embodiment.

Device 132 is an example of a device described herein. For example,device 132 can take the form of a classical data processing system, suchas a smartphone, a tablet computer, a laptop computer, client 110 in astationary or a portable form, a wearable computing device, or any othersuitable device. Any software application described as executing inanother data processing system in FIG. 1 can be configured to execute indevice 132 in a similar manner. Any data or information stored orproduced in another data processing system in FIG. 1 can be configuredto be stored or produced in device 132 in a similar manner.

Application 105 implements an embodiment described herein. Application105 implements the automatic generation of Ising Hamiltonian of anembodiment described herein. Application 105 passes, or causes to bepassed, the generated Ising Hamiltonian as an input to quantum dataprocessing systems 140. In the embodiment illustrated in FIG. 1,Q-system 140 includes a plurality of q-processors 142A-142D. Q-system140 then performs the solution space exploration to determine theoptimal solution of an optimization problem corresponding to the IsingHamiltonian.

Servers 104 and 106, storage unit 108, and clients 110, 112, and 114,and device 132 may couple to network 102 using wired connections,wireless communication protocols, or other suitable data connectivity.Clients 110, 112, and 114 may be, for example, personal computers ornetwork computers.

In the depicted example, server 104 may provide data, such as bootfiles, operating system images, and applications to clients 110, 112,and 114. Clients 110, 112, and 114 may be clients to server 104 in thisexample. Clients 110, 112, 114, or some combination thereof, may includetheir own data, boot files, operating system images, and applications.Data processing environment 100 may include additional servers, clients,and other devices that are not shown.

In the depicted example, data processing environment 100 may be theInternet. Network 102 may represent a collection of networks andgateways that use the Transmission Control Protocol/Internet Protocol(TCP/IP) and other protocols to communicate with one another. At theheart of the Internet is a backbone of data communication links betweenmajor nodes or host computers, including thousands of commercial,governmental, educational, and other computer systems that route dataand messages. Of course, data processing environment 100 also may beimplemented as a number of different types of networks, such as forexample, an intranet, a local area network (LAN), or a wide area network(WAN). FIG. 1 is intended as an example, and not as an architecturallimitation for the different illustrative embodiments.

Among other uses, data processing environment 100 may be used forimplementing a client-server environment in which the illustrativeembodiments may be implemented. A client-server environment enablessoftware applications and data to be distributed across a network suchthat an application functions by using the interactivity between aclient data processing system and a server data processing system. Dataprocessing environment 100 may also employ a service orientedarchitecture where interoperable software components distributed acrossa network may be packaged together as coherent business applications.Data processing environment 100 may also take the form of a cloud, andemploy a cloud computing model of service delivery for enablingconvenient, on-demand network access to a shared pool of configurablecomputing resources (e.g. networks, network bandwidth, servers,processing, memory, storage, applications, virtual machines, andservices) that can be rapidly provisioned and released with minimalmanagement effort or interaction with a provider of the service.

With reference to FIG. 2, this figure depicts a block diagram of a dataprocessing system in which illustrative embodiments may be implemented.Data processing system 200 is an example of a computer, such as servers104 and 106, or clients 110, 112, and 114 in FIG. 1, or another type ofdevice in which computer usable program code or instructionsimplementing the processes may be located for the illustrativeembodiments.

Data processing system 200 is also representative of a data processingsystem or a configuration therein, such as data processing system 132 inFIG. 1 in which computer usable program code or instructionsimplementing the processes of the illustrative embodiments may belocated. Data processing system 200 is described as a computer only asan example, without being limited thereto. Implementations in the formof other devices, such as device 132 in FIG. 1, may modify dataprocessing system 200, such as by adding a touch interface, and eveneliminate certain depicted components from data processing system 200without departing from the general description of the operations andfunctions of data processing system 200 described herein.

In the depicted example, data processing system 200 employs a hubarchitecture including North Bridge and memory controller hub (NB/MCH)202 and South Bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 arecoupled to North Bridge and memory controller hub (NB/MCH) 202.Processing unit 206 may contain one or more processors and may beimplemented using one or more heterogeneous processor systems.Processing unit 206 may be a multi-core processor. Graphics processor210 may be coupled to NB/MCH 202 through an accelerated graphics port(AGP) in certain implementations.

In the depicted example, local area network (LAN) adapter 212 is coupledto South Bridge and I/O controller hub (SB/ICH) 204. Audio adapter 216,keyboard and mouse adapter 220, modem 222, read only memory (ROM) 224,universal serial bus (USB) and other ports 232, and PCI/PCIe devices 234are coupled to South Bridge and I/O controller hub 204 through bus 238.Hard disk drive (HDD) or solid-state drive (SSD) 226 and CD-ROM 230 arecoupled to South Bridge and I/O controller hub 204 through bus 240.PCI/PCIe devices 234 may include, for example, Ethernet adapters, add-incards, and PC cards for notebook computers. PCI uses a card buscontroller, while PCIe does not. ROM 224 may be, for example, a flashbinary input/output system (BIOS). Hard disk drive 226 and CD-ROM 230may use, for example, an integrated drive electronics (IDE), serialadvanced technology attachment (SATA) interface, or variants such asexternal-SATA (eSATA) and micro- SATA (mSATA). A super I/O (SIO) device236 may be coupled to South Bridge and I/O controller hub (SB/ICH) 204through bus 238.

Memories, such as main memory 208, ROM 224, or flash memory (not shown),are some examples of computer usable storage devices. Hard disk drive orsolid state drive 226, CD-ROM 230, and other similarly usable devicesare some examples of computer usable storage devices including acomputer usable storage medium.

An operating system runs on processing unit 206. The operating systemcoordinates and provides control of various components within dataprocessing system 200 in FIG. 2. The operating system may be acommercially available operating system for any type of computingplatform, including but not limited to server systems, personalcomputers, and mobile devices. An object oriented or other type ofprogramming system may operate in conjunction with the operating systemand provide calls to the operating system from programs or applicationsexecuting on data processing system 200.

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs, such as application 105 in FIG. 1,are located on storage devices, such as in the form of code 226A on harddisk drive 226, and may be loaded into at least one of one or morememories, such as main memory 208, for execution by processing unit 206.The processes of the illustrative embodiments may be performed byprocessing unit 206 using computer implemented instructions, which maybe located in a memory, such as, for example, main memory 208, read onlymemory 224, or in one or more peripheral devices.

Furthermore, in one case, code 226A may be downloaded over network 201Afrom remote system 201B, where similar code 201C is stored on a storagedevice 201D. in another case, code 226A may be downloaded over network201A to remote system 201B, where downloaded code 201C is stored on astorage device 201D.

The hardware in FIGS. 1-2 may vary depending on the implementation.Other internal hardware or peripheral devices, such as flash memory,equivalent non-volatile memory, or optical disk drives and the like, maybe used in addition to or in place of the hardware depicted in FIGS.1-2. In addition, the processes of the illustrative embodiments may beapplied to a multiprocessor data processing system.

In some illustrative examples, data processing system 200 may be apersonal digital assistant (PDA), which is generally configured withflash memory to provide non-volatile memory for storing operating systemfiles and/or user-generated data. A bus system may comprise one or morebuses, such as a system bus, an I/O bus, and a PCI bus. Of course, thebus system may be implemented using any type of communications fabric orarchitecture that provides for a transfer of data between differentcomponents or devices attached to the fabric or architecture.

A communications unit may include one or more devices used to transmitand receive data, such as a modem or a network adapter. A memory may be,for example, main memory 208 or a cache, such as the cache found inNorth Bridge and memory controller hub 202. A processing unit mayinclude one or more processors or CPUs.

The depicted examples in FIGS. 1-2 and above-described examples are notmeant to imply architectural limitations. For example, data processingsystem 200 also may be a tablet computer, laptop computer, or telephonedevice in addition to taking the form of a mobile or wearable device.

Where a computer or data processing system is described as a virtualmachine, a virtual device, or a virtual component, the virtual machine,virtual device, or the virtual component operates in the manner of dataprocessing system 200 using virtualized manifestation of some or allcomponents depicted in data processing system 200. For example, in avirtual machine, virtual device, or virtual component, processing unit206 is manifested as a virtualized instance of all or some number ofhardware processing units 206 available in a host data processingsystem, main memory 208 is manifested as a virtualized instance of allor some portion of main memory 208 that may be available in the hostdata processing system, and disk 226 is manifested as a virtualizedinstance of all or some portion of disk 226 that may be available in thehost data processing system. The host data processing system in suchcases is represented by data processing system 200.

With reference to FIG. 3, this figure depicts example diagrams of a1-dimensional and a 2-dimensional Ising model. Ising (Z. Physik, 31,253, 1925) introduced a model consisting of a lattice of “spin”variables Si, which can only take the values +1 (↑) and −1(↓). Everyspin interacts with its nearest neighbors (2 in 1D) as well as with anexternal magnetic field h.

FIG. 3 illustrates an example 1-dimensional Ising model 302. TheHamiltonian of example 1D Ising model 302 is

${H\left( \left\{ s_{i} \right\} \right)} = {{{- J}{\sum\limits_{({i,j})}{s_{i}s_{j}}}} - {h{\sum\limits_{i}s_{i}}}}$

The sum <i,j> is over nearest neighbors (j=i±1 in 1D).

J is a constant specifying the strength of interaction. The term “spin”and “magnetic field” in the Ising model originate from its initialapplication to the phenomenon of spontaneous magnetization inferromagnetic materials such as iron. Each iron atom has an unpairedelectron and hence a net spin (or magnetic moment). At low temperature,the spins spontaneously align giving rise to a non-zero macroscopicmagnetic moment. The macroscopic magnetic moment disappears when thetemperature exceeds the Curie temperature (1043 K for iron).

The Ising model can be applied to many other problems beyond magnetism,such as phase separation in binary alloys, crystal growth, and solvingoptimization problems. Higher dimension Ising models are generally usedin solving many problems.

FIG. 3 further illustrates an example 2-dimensional Ising model 304. 2DIsing model 304 is defined over a square lattice of N spins underperiodic boundary conditions. Again, the Hamiltonian can be written as

${H\left( \left\{ s_{i} \right\} \right)} = {{{- J}{\sum\limits_{({i,j})}{s_{i}s_{j}}}} - {h{\sum\limits_{i}s_{i}}}}$

J describes the strength of interaction, h is external magnetic field,and the sum is over all <i,j> nearest neighbor pairs. Each spin has 4nearest neighbors.

With reference to FIG. 4, this figure depicts a block diagram of anexample configuration 400 for automatic generation of Ising Hamiltoniansfor solving optimization problems in quantum computing in accordancewith an illustrative embodiment. In an embodiment, application 402 is anexample of application 105 in FIG. 1.

Application 402 receives an optimization problem specification 404specifying a particular optimization problem that is desired to besolved. Optimization model encoding component 406 is configured tofacilitate a user to encode an optimization model corresponding to theoptimization problem using an encoding language. In one or moreembodiments, the optimization model includes one or more binary decisionvariables, an objective function (e.g., a quadradic objective function),and one or more equality constraints.

Unconstrained model generation component 408 is configured to transformthe encoded optimization model into an unconstrained model. In one ormore embodiments, unconstrained model generation component 408transforms the encoded optimization model into the unconstrained modelby penalizing the equality constraints of the quadratic objectivefunction by one or more penalty terms. Pauli term generation component410 is configured to convert the terms of the objective function of theunconstrained model to Pauli terms. In one or more embodiments, Pauliterm generation component 410 is configured to convert the linear termsand quadratic terms in a quadratic objective function of theunconstrained model to Pauli terms.

Ising Hamiltonian generation component 412 is configured to generate anIsing Hamiltonian corresponding to the optimization problem using thePaula terms. Application 402 is further configured to send one or moreinstructions indicative of the Ising Hamiltonian to a quantum computingsystem 416. In a particular embodiment, quantum computing system 416 isan example of quantum computing system 140 of FIG. 1. Quantum computingsystem 416 is configured to receive the one or more instructions,generate a quantum circuit using the Ising Hamiltonian, and compute anoptimization problem result 418.

With reference to FIG. 5, this figure depicts a flowchart of an exampleprocess 500 for automatic generation of Ising Hamiltonians for solvingoptimization problems in quantum computing in accordance with anillustrative embodiment. In one or more embodiments, process 500 isimplemented in part by application 105 or application 402.

In block 502, application 105 receives an optimization problemspecification specifying a particular optimization problem that isdesired to be solved. In block 504, application 105 encodes anoptimization model corresponding to the optimization problem using anencoding language. In one or more embodiments, the optimization modelincludes one or more binary decision variables, an objective function(e.g., a linear or a quadradic objective function), and one or moreequality constraints. In an alternative embodiment, a user receives theoptimization problem specification and encodes the optimization modelusing an encoding language instead of application 105.

In block 506, application 105 transforms the encoded optimization modelinto an unconstrained model by penalizing the one or more equalityconstraints of the objective function by one or more penalty terms. Inblock 508, application 105 converts the one or more linear terms and oneor more quadratic terms in the objective function of the unconstrainedmodel to one or more Pauli terms.

In block 510, application 105 generates an Ising Hamiltoniancorresponding to the optimization problem using the Paula terms. Inblock 512, application 105 provides one or more instructions indicativeof the Ising Hamiltonian to a quantum computing system. In a particularembodiment, the quantum computing system is an example of quantumcomputing system 140 of FIG. 1. In one or more embodiments, theinstruction includes the Ising Hamiltonian.

In block 514, the quantum computing system may optionally compute anoptimization problem result using the Ising Hamiltonian. In a particularembodiment, the optimization problem result includes a solution to theoptimization problem. In an alternative embodiment, the IsingHamiltonian can be passed to a quantum algorithm, such as a VQE or aQAOA algorithm to generate a quantum circuit, which will then becompiled and executed on a quantum computer or quantum computersimulator to compute the optimization problem result. In block 516,application 105 receives the optimization problem result and process 500ends.

Thus, a computer implemented method, system or apparatus, and computerprogram product are provided in the illustrative embodiments forautomatic generation of Ising Hamiltonians for solving optimizationproblems in quantum computing and other related features, functions, oroperations. Where an embodiment or a portion thereof is described withrespect to a type of device, the computer implemented method, system orapparatus, the computer program product, or a portion thereof, areadapted or configured for use with a suitable and comparablemanifestation of that type of device.

Where an embodiment is described as implemented in an application, thedelivery of the application in a Software as a Service (SaaS) model iscontemplated within the scope of the illustrative embodiments. In a SaaSmodel, the capability of the application implementing an embodiment isprovided to a user by executing the application in a cloudinfrastructure. The user can access the application using a variety ofclient devices through a thin client interface such as a web browser(e.g., web-based e-mail), or other light-weight client-applications. Theuser does not manage or control the underlying cloud infrastructureincluding the network, servers, operating systems, or the storage of thecloud infrastructure. In some cases, the user may not even manage orcontrol the capabilities of the SaaS application. In some other cases,the SaaS implementation of the application may permit a possibleexception of limited user-specific application configuration settings.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, including but not limited tocomputer-readable storage devices as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

What is claimed is:
 1. A method for configuring a quantum computingsystem to determine a solution to an optimization problem, the methodcomprising: encoding the optimization problem in an encoding language toproduce an encoded optimization model; transforming the encodedoptimization model into a unconstrained model, the encoded optimizationmodel including an objective function having one or more terms;converting the one or more terms to one or more Pauli terms; generatingan Ising Hamiltonian using the one or more terms, the Ising Hamiltoniancorresponding to the optimization problem; and providing an instructionindicative of the Ising Hamiltonian to the quantum computing system. 2.The method of claim 1, wherein the quantum computing system isconfigured to compute a result associated with the optimization problembased upon the Ising Hamiltonian.
 3. The method of claim 2, furthercomprising: receiving the result from the quantum computing system. 4.The method of claim 3, wherein the result is a solution of theoptimization problem.
 5. The method of claim 1, wherein transforming theencoded optimization model into a unconstrained model comprisespenalizing one or more equality constraints of the objective function byone or more penalty terms.
 6. The method of claim 1, wherein the one ormore terms include at least one of a linear term or a quadratic term. 7.The method of claim 1, wherein the objective function is a linearobjective function or a quadradic objective function.
 8. The method ofclaim 1, wherein the objective function further includes one or morebinary decision variables associated with the optimization problem. 9.The method of claim 1, wherein the encoding of the optimization problemis performed by a user.
 10. A computer usable program product comprisingone or more computer-readable storage devices, and program instructionsstored on at least one of the one or more storage devices, the storedprogram instructions comprising: program instructions to encode anoptimization problem in an encoding language to produce an encodedoptimization model; program instructions to transform the encodedoptimization model into a unconstrained model, the encoded optimizationmodel including an objective function having one or more terms; programinstructions to convert the one or more terms to one or more Pauliterms; program instructions to generate an Ising Hamiltonian using theone or more terms, the Ising Hamiltonian corresponding to theoptimization problem; and program instructions to provide an instructionindicative of the Ising Hamiltonian to a quantum computing system. 11.The computer usable program product of claim 10, wherein the quantumcomputing system is configured to compute a result associated with theoptimization problem based upon the Ising Hamiltonian.
 12. The computerusable program product of claim 11, further comprising: programinstructions to receive the result from the quantum computing system.13. The computer usable program product of claim 12, wherein the resultis a solution of the optimization problem.
 14. The computer usableprogram product of claim 10, wherein transforming the encodedoptimization model into a unconstrained model comprises penalizing oneor more equality constraints of the objective function by one or morepenalty terms.
 15. The computer usable program product of claim 10,wherein the one or more terms include at least one of a linear term or aquadratic term.
 16. The computer usable program product of claim 10,wherein the objective function is a linear objective function or aquadradic objective function.
 17. The computer usable program product ofclaim 10, wherein the objective function further includes one or morebinary decision variables associated with the optimization problem. 18.The computer usable program product of claim 12, wherein the computerusable code is stored in a computer readable storage device in a dataprocessing system, and wherein the computer usable code is transferredover a network from a remote data processing system.
 19. The computerusable program product of claim 12, wherein the computer usable code isstored in a computer readable storage device in a server data processingsystem, and wherein the computer usable code is downloaded over anetwork to a remote data processing system for use in a computerreadable storage device associated with the remote data processingsystem.
 20. A computer system comprising one or more processors, one ormore computer-readable memories, and one or more computer-readablestorage devices, and program instructions stored on at least one of theone or more storage devices for execution by at least one of the one ormore processors via at least one of the one or more memories, the storedprogram instructions comprising: program instructions to encode anoptimization problem in an encoding language to produce an encodedoptimization model; program instructions to transform the encodedoptimization model into a unconstrained model, the encoded optimizationmodel including an objective function having one or more terms; programinstructions to convert the one or more terms to one or more Pauliterms; program instructions to generate an Ising Hamiltonian using theone or more terms, the Ising Hamiltonian corresponding to theoptimization problem; and program instructions to provide an instructionindicative of the Ising Hamiltonian to a quantum computing system.